﻿Public Class WidgetsForm
    Friend parentform1 As ParentForm

    Public f As ParentForm

    'Dim tabpage1 As New TabPage("ASD")

    Private Sub CheckBox7_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TestCheckBox.CheckedChanged


    End Sub



    Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CPUcheckBox.CheckedChanged
        If CPUcheckBox.Checked = True Then
            ProcessNotifyIcon.Visible = True
            ProcessNotifyIcon.BalloonTipText = "CpuUsageControl is ON"


            f.CpUusageControl1.Visible = True
            'parentform1.CpUusageControl1.PerformanceCounter1.MachineName

            'parentform1.CpUusageControl1.CPUtotalPercent.Text
            'CPUtotalPercent.Text()
            'parentform1.CpUusageControl1.
            'parentform1.CpUusageControl1.CPUBar.Value.ToString
            'CPUtotalPercent.Text =



            ProcessNotifyIcon.ShowBalloonTip(700)
        Else
            ProcessNotifyIcon.Visible = False
        End If

    End Sub

    Private Sub ExitToolStripMenuItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
        Me.Close()
    End Sub


    Private Sub EmailCheckBox_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EmailCheckBox.CheckedChanged


        ' If EmailCheckBox.Checked = True Then
        'parentform1.Controls.Add(tabpage1)
        ' Else
        'parentform1.Controls.Remove(parentform1.TabControl1.TabPages(4))
        ' End If
    End Sub

    Private Sub HDDcheckBox_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HDDcheckBox.CheckedChanged
        If HDDcheckBox.Checked = True Then
            ProcessNotifyIcon.Visible = True
            ProcessNotifyIcon.BalloonTipText = "DiskControl is ON"
            ProcessNotifyIcon.ShowBalloonTip(700)
        Else
            ProcessNotifyIcon.Visible = False
        End If

    End Sub


    Private Sub AboutUsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutUsToolStripMenuItem.Click

        Dim aboutusForm As New AboutUsForm

        aboutusForm.Show()



    End Sub

    Private Sub WidgetsForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        f = My.Application.OpenForms.Item(0)
        'f = ParentForm1

    End Sub
End Class